package com.boge.utils.timer;

import java.util.Map;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;

import com.boge.service.UserLockService;

/**
 * 每天0点清空用户锁
 * @author erlang
 *
 */
public class UserFlushTask {
	Logger logger = Logger.getLogger(UserFlushTask.class);
	
	@Resource
	UserLockService userLockService;
	
	public void run(/*JobExecutionContext jobExecutionContext*/) {
		System.out.println("定时任务线程进行中...");
		/*JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
		for (Map.Entry entry : jobDataMap.entrySet()) {
			System.out.println("key:" + entry.getKey() + " value:" + entry.getValue()); 
		}*/
		boolean flag = userLockService.cleanUserLock();
		logger.debug("清空用户锁:" + flag);
	}
	
}
